Skip to content

Statamic 6#110

Merged
jasonvarga merged 21 commits intomasterfrom
statamic-6-support
Apr 16, 2026
Merged

Statamic 6#110
jasonvarga merged 21 commits intomasterfrom
statamic-6-support

Conversation

@jasonvarga
Copy link
Copy Markdown
Member

@jasonvarga jasonvarga commented Apr 9, 2026

Closes #109
Depends on statamic/cms#13974

Summary

Adds compatibility with Statamic 6, which moved the publish form to Vue 3 with the Composition API and Pinia.

Changes

  • Build/deps: Vite 8, updated dependencies, npm audit fixes, adjusted vite.config.js, composer.json constraints bumped for Statamic 6.
  • Field focus & locking: Field lock state lives in the container's reactive fieldFocus ref. The Workspace calls the container's focusField(handle, user) / blurField(handle, user) to update it, and watches it for local-user changes to broadcast focus/blur whispers.
  • State store: Pinia replaces Vuex. Extracted into resources/js/store.js so the StatusBar and Workspace don't redefine it.
  • Values & meta: Read from / write to the container's values and meta refs via setValues, setFieldValue, setMeta, setFieldMeta instead of dispatching to the Vuex publish module. Meta is still cleaned through cleanEntireMetaPayload / cleanMetaPayload and merged on apply.
  • Misc: Reuse Statamic's debounce util, status bar tweaks.

Test plan

  • Open the same entry as two users — focusing a field shows the other user's avatar and locks the field.
  • Typing in a field syncs to the other user (debounced).
  • Force-unlock from the status bar dropdown works.
  • Saving / publishing / restoring a revision shows the correct toast / blocking notification.
  • Joining mid-session restores values, meta, and current focus state.
  • Navigating away (SPA + full reload) properly leaves the channel.

joshuablum and others added 20 commits February 17, 2026 17:37
…oration

Replace the mixin-based workspace initialization with publish-container-created
and publish-container-destroyed events. Use the container's focusField/blurField
methods and fieldFocus ref directly instead of emitting field:lock/field:unlock
events and tracking focus state separately in the Pinia store.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- template at the bottom
- import components and use StudlyCase tags
- revert unlock event flow to how it was before. cms was missing pushed component event bindings.
Updating lastValues before setValues keeps the deep values watcher
from firing a spurious 'updated' whisper for every field when a
joining user applies the initial state payload.
Previously we added a new unload listener per publish container,
which accumulated across SPA navigations and could double-destroy
workspaces. A single module-level handler iterates whatever is live.
@jasonvarga jasonvarga marked this pull request as ready for review April 16, 2026 20:17
@jasonvarga jasonvarga merged commit 5b98d98 into master Apr 16, 2026
@jasonvarga jasonvarga deleted the statamic-6-support branch April 16, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compatibility with Statamic 6

2 participants